-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Convert to using list of accessibility elements for iOS tab indexes #11077
Conversation
// lazy-loading this list so that the expensive call to GetAccessibilityElements only happens when VoiceOver is on. | ||
if (_accessibilityElements == null || _accessibilityElements.Count == 0) | ||
{ | ||
_accessibilityElements = _parent.GetAccessibilityElements(); | ||
var elements =_parent.GetAccessibilityElements(); | ||
if(elements != null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation for this property says the default is null
https://developer.apple.com/documentation/objectivec/nsobject/1615147-accessibilityelements
Containers can implement this property instead of the dynamic methods to support the retrieval of the contained elements. The default value of this property is nil.
When I do that it seems like the accessibility just returns to the default behavior. I added all the repro's from the PR listed here #9702 and I tested the Accessibility demo on xamarin-samples.
We might need to add the setAccessibilityElements side of this as well for certain edge cases.
For now we'll keep it simple and see if that works
Failures unrelated |
cbb3a67
to
c328d06
Compare
@arevellfraedom summarized these properties really well here #9702 (comment) @arevellfraedom I've tested through all the issues associated with issue #9702 and added UI Tests for them as well If you have any additional cases or things you feel this PR might break please let me know AFAICT this statement you made
Is true Here's the nuget if you want to test |
All green |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wunderbar!
Description of Change
Convert to using list of accessibility elements over methods. My theory here is that the performance of the individual methods when going across the bridge was causing hiccups with Appium.
I noticed on a ListView that it would call the "getMethods" for every single elements as you moved the mouse around which caused it to move incredibly slow.
Once I swapped over to just using the getter it all seemed to work much smoother
#9702 (comment)
Issues Resolved
Platforms Affected
Testing Procedure
PR Checklist